<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
  <script src="/vue.js"></script>
</head>
<body>
  <div id="root">
    <!-- <ul v-if="isShow">
      <li v-for="li,index in list">
        {{li}}
      </li>
    </ul> -->
    <!-- <ul v-show="isShow">
      <li>item 1</li>
      <li>item 2</li>
      <li>item 3</li>
    </ul> -->
    <div v-if="isShow">
      姓名：<input type="text" key="name" value="">
    </div>
    <div v-else>
      年龄：<input type="text" key="age" value="">
    </div>
    
    <button @click="handleClick">click</button>
  </div>
  <script>
    var vm = new Vue({
      el: '#root',
      data: {
        isShow: false,
        isShow2: true,
        list: [
          'aaa',
          'bbb',
          'ccc'
        ]
      },
      methods: {
        handleClick() {
          this.isShow = !this.isShow
        }
      },
    })
  </script>
</body>
</html>